home *** CD-ROM | disk | FTP | other *** search
/ Acorn User: China / Acorn User China CD-ROM (UK) (Disc A) / Acorn User China CD-ROM (UK) (Disc A).bin / DEMON / MISC / READNEWS.ARC / !ReadNews_Library_InjectComp < prev    next >
Encoding:
Text File  |  1994-05-11  |  921 b   |  40 lines

  1. | > InjectNews
  2. |
  3. | Syntax: InjectNews <NewsServerAddress> <Filename>
  4. |
  5. | InjectNews will queue the specified file for posting to News via the
  6. | specified NewsServer. It performs no error checking on the file, and
  7. | assumes that the file contains a valid header.
  8. |
  9. | This version of InjectNews produces compressed batches of news, but
  10. | needs a lot of RAM to run in.
  11.  
  12. | Ensure enough memory for compress to run
  13. Wimpslot -min 488k
  14.  
  15. | Save old debug level, set current debug level to -1
  16. Set OldDebug <Rucp$Debuglevel>
  17. Set Rucp$Debuglevel -1
  18.  
  19. | Generate news batch
  20. Set Inject$File %1
  21. Run <ReadNews$Dir>.Library.SetupPost
  22. Unset Inject$File
  23. Print %1 { >> %1A }
  24. Remove %1
  25.  
  26. | Compress batch
  27. Unx_Compr -b 12 %1A
  28. Remove %1A
  29. Print %1A_Z { >> %1B }
  30. Remove %1A_Z
  31.  
  32. | Execute 'rnews' on this file at remote end.
  33. Uux - %0!rnews <%1B
  34. | and tidy up.
  35. Remove %1B
  36.  
  37. | Restore previous debug level
  38. Set Rucp$Debuglevel <OldDebug>
  39. Unset OldDebug
  40.